package com.winphone.uvam.exception;


import com.winphone.uvam.utils.base.HttpStatus;

/**
 * 自定义异常
 *
 * @author jack
 */
public class CustomerException extends RuntimeException {

    /**
     * 异常状态码
     */
    private HttpStatus httpStatus;

    /**
     * 异常信息
     */
    private String message;

    public CustomerException(HttpStatus httpStatus) {
        this(httpStatus, httpStatus.getMessage());
    }

    public CustomerException(HttpStatus httpStatus, String message) {
        this.httpStatus = httpStatus;
        this.message = message;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public HttpStatus getHttpStatus() {
        return httpStatus;
    }

    public void setHttpStatus(HttpStatus httpStatus) {
        this.httpStatus = httpStatus;
    }
}
